package cn.asterly.cicada.common.model;

import java.io.Serializable;
import java.util.List;

public class DataTablesResult implements Serializable {

    //是否成功标识
    private Boolean success;

    //总记录数
    private int recordsTotal;

    //过滤数
    private int recordsFiltered;

    //错误信息
    private String messge;

    //返回的数据
    private List<?> data;

    //返回状态码
    private int statusCode;

    public DataTablesResult() {

    }

    public DataTablesResult(Boolean success,String messge, int statusCode, List<?> data) {
        this.success = success;
        this.statusCode = statusCode;
        this.messge = messge;
        this.data = data;

    }

    public DataTablesResult(Boolean success, int recordsTotal, int recordsFiltered, String error, List<?> data, int statusCode) {
        this.success = success;
        this.recordsTotal = recordsTotal;
        this.recordsFiltered = recordsFiltered;
        this.messge = error;
        this.data = data;
        this.statusCode = statusCode;
    }

    public DataTablesResult(boolean success, String messge, int statusCode) {
        this.success = success;
        this.statusCode = statusCode;
        this.messge = messge;
    }

    public int getRecordsTotal() {
        return recordsTotal;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public void setRecordsTotal(int recordsTotal) {
        this.recordsTotal = recordsTotal;
    }

    public int getRecordsFiltered() {
        return recordsFiltered;
    }

    public void setRecordsFiltered(int recordsFiltered) {
        this.recordsFiltered = recordsFiltered;
    }



    public String getError() {
        return messge;
    }

    public void setError(String error) {
        this.messge = error;
    }

    public List<?> getData() {
        return data;
    }

    public void setData(List<?> data) {
        this.data = data;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }
}